let obj = {
    name:'csc',
    age:18,
    salary:150000,
    like:() => {
        console.log(this.age);
    }
}

let data = new Proxy(obj, {
    get(target, key) {
        return target[key]
    },
    set(target, key, value) {
        return target[key] = value
    },
    has(target, key) {
        return target[key]
    }
})

console.log(data.name, data.age, data.like());
data.age = 19
console.log(data.age);
// console.log(data.has(age));

Object.defineProperty(obj, 'a',{
    value:1,
    writable: false,
    enumerable: false,
    configurable: false
})
console.log(obj.a);